package loader;

import context.SoiContext;

/**
 * @className: DefaultDataLoader
 * @author: ocxz1
 * @date: 2025/3/27 下午9:42
 * @Version: 1.0
 * @description: soi 默认数据加载器
 */
public class DefaultDataLoader implements DataLoader {

    @Override
    public <T> T loadData(SoiContext soiContext, Class<T> tClass) {
        return soiContext.getContextBeanByClass(tClass);
    }

    @Override
    public <T> T loadData(SoiContext soiContext, String parameterName) {
        return soiContext.getBusinessData(parameterName, null);
    }
}
